[PW_SID:1069630] ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue#1647
[PW_SID:1069630] ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue#1647linux-riscv-bot wants to merge 9 commits intoworkflow__riscv__fixesfrom
Conversation
As a step towards unifying the interface for retrieving ACPI CPU UID across architectures, introduce a new function acpi_get_cpu_uid() for arm64. While at it, add input validation to make the code more robust. Reimplement get_cpu_for_acpi_id() based on acpi_get_cpu_uid() for consistency, and move its implementation next to the new function for code coherence. Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
As a step towards unifying the interface for retrieving ACPI CPU UID across architectures, introduce a new function acpi_get_cpu_uid() for loongarch. While at it, add input validation to make the code more robust. Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
As a step towards unifying the interface for retrieving ACPI CPU UID across architectures, introduce a new function acpi_get_cpu_uid() for riscv. While at it, add input validation to make the code more robust. And also update acpi_numa.c and rhct.c to use the new interface instead of the legacy get_acpi_id_for_cpu(). Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
As a step towards unifying the interface for retrieving ACPI CPU UID across architectures, introduce a new function acpi_get_cpu_uid() for x86. While at it, add input validation to make the code more robust. Update Xen-related code to use acpi_get_cpu_uid() instead of the legacy cpu_acpi_id() function, and remove the now-unused cpu_acpi_id() to clean up redundant code. Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Centralize acpi_get_cpu_uid() in include/linux/acpi.h (global scope) and remove arch-specific declarations from arm64/loongarch/riscv/x86 asm/acpi.h. This unifies the interface across architectures and simplifies maintenance by eliminating duplicate prototypes. Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Update arm_cspmu to use acpi_get_cpu_uid() instead of get_acpi_id_for_cpu(), aligning with unified ACPI CPU UID interface. No functional changes are introduced by this switch (valid inputs retain original behavior). Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Update acpi/pptt.c to use acpi_get_cpu_uid() and remove unused get_acpi_id_for_cpu() from arm64/loongarch/riscv, completing PPTT's migration to the unified ACPI CPU UID interface Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
pcie_tph_get_cpu_st() uses the Query Cache Locality Features _DSM [1]
to retrieve the TPH Steering Tag for memory associated with the CPU
identified by its "cpu_uid" parameter, a Linux logical CPU ID.
The _DSM requires an ACPI Processor UID, which pcie_tph_get_cpu_st()
previously assumed was the same as the Linux logical CPU ID. This is
true on x86 but not on arm64, so pcie_tph_get_cpu_st() returned the
wrong Steering Tag, resulting in incorrect TPH functionality on arm64.
Convert the Linux logical CPU ID to the ACPI Processor UID with
acpi_get_cpu_uid() before passing it to the _DSM. Additionally, rename
the pcie_tph_get_cpu_st() parameter from "cpu_uid" to "cpu" to reflect
that it represents a logical CPU ID (not an ACPI Processor UID).
[1] According to ECN_TPH-ST_Revision_20200924
(https://members.pcisig.com/wg/PCI-SIG/document/15470), the input
is defined as: "If the target is a processor, then this field
represents the ACPI Processor UID of the processor as specified in
the MADT. If the target is a processor container, then this field
represents the ACPI Processor UID of the processor container as
specified in the PPTT."
Fixes: d2e8a34 ("PCI/TPH: Add Steering Tag support")
Cc: stable@vger.kernel.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 1: "[v10,1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 2: "[v10,2/8] LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval" |
|
Patch 6: "[v10,6/8] perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu()" |
|
Patch 6: "[v10,6/8] perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu()" |
|
Patch 6: "[v10,6/8] perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu()" |
|
Patch 6: "[v10,6/8] perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu()" |
|
Patch 6: "[v10,6/8] perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 7: "[v10,7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
|
Patch 8: "[v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM" |
e3d6c9b to
c315cbf
Compare
PR for series 1069630 applied to workflow__riscv__fixes
Name: ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1069630
Version: 10